//import Seven from 'node-7z'
var Seven = require('node-7z'); 

// myStream is an Readable stream
const myStream = Seven.extractFull('./chunxiao.7z', './output/dir/', { 
  $progress: true
})
 
myStream.on('data', function (data) {
  console.log('data'); //? { status: 'extracted', file: 'extracted/file.txt" }
})
 
myStream.on('progress', function (progress) {
  console.log('progress'); //? { percent: 67, fileCount: 5, file: undefinded }
})
 
myStream.on('end', function () {
    // end of the operation, get the number of folders involved in the operation
  myStream.info.get('Folders') //? '4'
})
 
myStream.on('error', function (err) {
  console.error(err);
})
